package com.hope.saas.guice;

import com.google.inject.Guice;
import com.google.inject.Injector;

/**
 * @author lizhitao
 * @date 2021/4/20
 */
public class Main {

    public static void main(String[] args) {
        Injector injector = Guice.createInjector(new GuiceConfig());
        GuiceUserService userService = injector.getInstance(GuiceUserService.class);
        System.out.println(userService.toString());

        NoGuiceUserService noUserService = injector.getInstance(NoGuiceUserService.class);
        System.out.println(noUserService.toString());
    }
}
